﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using 建造者模式.Model;

namespace 建造者模式
{
    /// <summary>
    /// 福特工人
    /// </summary>
    public class BuilderFord : AbstractBuilder
    {

        private Engine _Engine = null;
        private Wheels _Wheels = null;
        private Light _Ligth = null;
        public override void Engine()
        {
            this._Engine = new Engine { Name = "_Engine" };
            Console.WriteLine($"{this.GetType().Name} builder Engine");
        }


        public override void Wheels()
        {
            _Wheels = new Wheels { Name = "_Wheels" };
            Console.WriteLine($"{this.GetType().Name} builder Wheels");
        }

        public override void Light()
        {
            _Ligth = new Light { Name = "_Ligth" };
            Console.WriteLine($"{this.GetType().Name} builder Light");
        }

        public override Car Car()
        {

            Console.WriteLine($"{this._Engine} {this._Ligth} {this._Wheels}");
            Console.WriteLine($"{this.GetType().Name} builder Car");
            return new Car(this._Engine, this._Ligth, this._Wheels);
        }
    }
}
